473,420 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,420 software developers and data experts.

Dropdownlist and OnMouseover Event using Ajax

Hi All,

I have a webform in asp.net framework 1.1 where the dropdownlist is
populated with list of locations from the database. The depending on the list
selected, the user will be able to see functions associated for that location.

Ex: Location: Charleston
Functions: Add, Delete, Cancel, Edit

Location: Los Angeles
Functions: Activate, Cancel

The functions will be displayed in a Repeater control in the right corner of
the page.
I was able to use OnChange of this dropdownlist to show the list of
functions. But, I would like to use OnMouseover of the list of items in the
dropdownlist to show the functions. The list has to change everytime the user
does a mouseover on the location. How can I accomplish this?

Here is my code:

<asp:DropDownList id="LocationsGroups" tabIndex="16" runat="server"
cssclass="body-small" width="100%"></asp:DropDownList>

<asp:repeater id="GrpLocFunctions" runat="server">
<ItemTemplate>
<tbody>
<tr class="regular-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="alternate-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:repeater>

AJAX code:

function filterFuncs() {
var gl = document.getElementById('LocationsGroups').options .value;
SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
filterFuncs_CallBack);

}

function filterFuncs_CallBack(res) {
if(res.error == null) {
document.getElementById('GroupLocationFunctions'). innerHTML =
res.value;
}
}

The code behind calls this

LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")

I tried to change the OnChange to OnMouseOver. It didnot work.

Appreciate some help.

Thanks.

Mar 31 '07 #1
3 6557
Hi Deepa,

IE doesn't seem to support onmouseover on the option tag, which is I *think*
what you're getting at (ie, when someone mouses over an item in the opened
drop-down menu you can detect that through an event and, in your case,
update something on the page). It appears as though some browsers support
this, but IE does not (see the "Applies to" section at the bottom of this
page):

http://msdn.microsoft.com/library/de...nmouseover.asp

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"Deepa" <De***@discussions.microsoft.comwrote in message
news:FF**********************************@microsof t.com...
Hi All,

I have a webform in asp.net framework 1.1 where the dropdownlist is
populated with list of locations from the database. The depending on the
list
selected, the user will be able to see functions associated for that
location.

Ex: Location: Charleston
Functions: Add, Delete, Cancel, Edit

Location: Los Angeles
Functions: Activate, Cancel

The functions will be displayed in a Repeater control in the right corner
of
the page.
I was able to use OnChange of this dropdownlist to show the list of
functions. But, I would like to use OnMouseover of the list of items in
the
dropdownlist to show the functions. The list has to change everytime the
user
does a mouseover on the location. How can I accomplish this?

Here is my code:

<asp:DropDownList id="LocationsGroups" tabIndex="16" runat="server"
cssclass="body-small" width="100%"></asp:DropDownList>

<asp:repeater id="GrpLocFunctions" runat="server">
<ItemTemplate>
<tbody>
<tr class="regular-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="alternate-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:repeater>

AJAX code:

function filterFuncs() {
var gl = document.getElementById('LocationsGroups').options .value;
SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
filterFuncs_CallBack);

}

function filterFuncs_CallBack(res) {
if(res.error == null) {
document.getElementById('GroupLocationFunctions'). innerHTML =
res.value;
}
}

The code behind calls this

LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")

I tried to change the OnChange to OnMouseOver. It didnot work.

Appreciate some help.

Thanks.

Mar 31 '07 #2
Hi Ben,

Thanks for the info.

Is there any other way to accomplish this?

Deepa

"Ben Rush" wrote:
Hi Deepa,

IE doesn't seem to support onmouseover on the option tag, which is I *think*
what you're getting at (ie, when someone mouses over an item in the opened
drop-down menu you can detect that through an event and, in your case,
update something on the page). It appears as though some browsers support
this, but IE does not (see the "Applies to" section at the bottom of this
page):

http://msdn.microsoft.com/library/de...nmouseover.asp

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"Deepa" <De***@discussions.microsoft.comwrote in message
news:FF**********************************@microsof t.com...
Hi All,

I have a webform in asp.net framework 1.1 where the dropdownlist is
populated with list of locations from the database. The depending on the
list
selected, the user will be able to see functions associated for that
location.

Ex: Location: Charleston
Functions: Add, Delete, Cancel, Edit

Location: Los Angeles
Functions: Activate, Cancel

The functions will be displayed in a Repeater control in the right corner
of
the page.
I was able to use OnChange of this dropdownlist to show the list of
functions. But, I would like to use OnMouseover of the list of items in
the
dropdownlist to show the functions. The list has to change everytime the
user
does a mouseover on the location. How can I accomplish this?

Here is my code:

<asp:DropDownList id="LocationsGroups" tabIndex="16" runat="server"
cssclass="body-small" width="100%"></asp:DropDownList>

<asp:repeater id="GrpLocFunctions" runat="server">
<ItemTemplate>
<tbody>
<tr class="regular-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="alternate-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:repeater>

AJAX code:

function filterFuncs() {
var gl = document.getElementById('LocationsGroups').options .value;
SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
filterFuncs_CallBack);

}

function filterFuncs_CallBack(res) {
if(res.error == null) {
document.getElementById('GroupLocationFunctions'). innerHTML =
res.value;
}
}

The code behind calls this

LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")

I tried to change the OnChange to OnMouseOver. It didnot work.

Appreciate some help.

Thanks.


Apr 1 '07 #3
You may want to start looking at other control developers and see if someone
has implemented anything that will allow you to do this. Perhaps Telerik
(http://www.telerik.com); I've used them before and am a big fan. I'm
unaware as to whether they have anything for you.

You can maybe look to another option for displaying the locations (in lieu
of using a dropdown list). Perhaps just a scrollable DIV tag in the browser,
etc.

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"Deepa" <De***@discussions.microsoft.comwrote in message
news:01**********************************@microsof t.com...
Hi Ben,

Thanks for the info.

Is there any other way to accomplish this?

Deepa

"Ben Rush" wrote:
>Hi Deepa,

IE doesn't seem to support onmouseover on the option tag, which is I
*think*
what you're getting at (ie, when someone mouses over an item in the
opened
drop-down menu you can detect that through an event and, in your case,
update something on the page). It appears as though some browsers support
this, but IE does not (see the "Applies to" section at the bottom of this
page):

http://msdn.microsoft.com/library/de...nmouseover.asp

--
~~~~~~~~~~~
Ben Rush
http://www.ben-rush.net/blog
"Deepa" <De***@discussions.microsoft.comwrote in message
news:FF**********************************@microso ft.com...
Hi All,

I have a webform in asp.net framework 1.1 where the dropdownlist is
populated with list of locations from the database. The depending on
the
list
selected, the user will be able to see functions associated for that
location.

Ex: Location: Charleston
Functions: Add, Delete, Cancel, Edit

Location: Los Angeles
Functions: Activate, Cancel

The functions will be displayed in a Repeater control in the right
corner
of
the page.
I was able to use OnChange of this dropdownlist to show the list of
functions. But, I would like to use OnMouseover of the list of items in
the
dropdownlist to show the functions. The list has to change everytime
the
user
does a mouseover on the location. How can I accomplish this?

Here is my code:

<asp:DropDownList id="LocationsGroups" tabIndex="16" runat="server"
cssclass="body-small" width="100%"></asp:DropDownList>

<asp:repeater id="GrpLocFunctions" runat="server">
<ItemTemplate>
<tbody>
<tr class="regular-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="alternate-row">
<td width="100%"><%# DataBinder.Eval(Container.DataItem, "FUNCTION") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</tbody>
</table>
</FooterTemplate>
</asp:repeater>

AJAX code:

function filterFuncs() {
var gl = document.getElementById('LocationsGroups').options .value;
SunCom.UsersAgentAdmin.UserMaint.FilterGroupLocati onFunctions(gl,
filterFuncs_CallBack);

}

function filterFuncs_CallBack(res) {
if(res.error == null) {
document.getElementById('GroupLocationFunctions'). innerHTML =
res.value;
}
}

The code behind calls this

LocationsGroups.Attributes.Add("OnChange", "filterFuncs();")

I tried to change the OnChange to OnMouseOver. It didnot work.

Appreciate some help.

Thanks.



Apr 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nelson Vega | last post by:
Hello: I have to show in a dropdownlist something but I can't resize the control(dropdownlist) but could be possible some text or some options in the dropdownlist are too bing I mean that the...
3
by: RFS666 | last post by:
Hello together, I tried to find out about populating an asp.net server control (a dropdownlist) from the clientside jscript, but I didn't find a solution up to now. I cannot use a html...
1
by: Santosh | last post by:
Dear all, i am giving selection to the user like when it select country from asp.net dropdownlist it will display all records in next dropdownlist related to it on asp.net...
1
by: mark4asp | last post by:
I moved a page to another web-site and now it's broke! I had 5 pages in their own web-site. These pages have now been moved to another web-site. Everything is fine except that one of the pages,...
3
by: equazcion | last post by:
Hi, I have an image reference (IMG) in my page that changes depending on the value of a database field. Clicking the image triggers an Ajax call to change the database field (toggles the field...
8
by: henryrhenryr | last post by:
I'm trying to log all links clicked. I'm just working this out so there may be some astoundingly bad methods. Please point out! It all works nicely though if I use mouseover events as the...
0
coolv
by: coolv | last post by:
Hello Everyone I want to Reload Second Dropdownlist from selected value of first Dropdownlist using Ajax in ASp.NET Also I want a to make validation using Ajax on page. Can anyone help me. ...
2
by: =?Utf-8?B?Q2hyaXMgRmluaw==?= | last post by:
I have a general question regarding VS2008 and Ajax Toolkit 3.5. Currently I have a dropdownlist populated from the database. When the user selects and item, the OnSelectedIndexChanged event...
3
by: =?Utf-8?B?Y21lZWsxXzE5OTk=?= | last post by:
Hello, On a webpage, create an UpdatePanel with two DropDownLists. Set AutoPostBack of DropDownList1 to true. In the SelectedIndexChanged method, refill DropDownList2 and set the focus to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.